﻿using PMS.Core.Configuration.CommonEnumConfigs;

namespace PMS.Data.Entities.Customers
{
    /// <summary>
    /// Represents a customer password
    /// </summary>
    public partial class CustomerPassword : BaseEntity
    {
        public CustomerPassword()
        {
            PasswordFormat = PasswordFormat.Clear;
        }

        /// <summary>
        /// Gets or sets the customer identifier
        /// </summary>
        public int CustomerId { get; set; }

        /// <summary>
        /// Gets or sets the password
        /// </summary>
        public string Password { get; set; }

        /// <summary>
        /// Gets or sets the password format identifier
        /// </summary>
        public int PasswordFormatId { get; set; }

        /// <summary>
        /// 密码安全级别，数值越高，密码复杂度越高
        /// </summary>
        public PasswordStrongLevel PasswordStrongLevel { get; set; }

        /// <summary>
        /// Gets or sets the password salt
        /// </summary>
        public string PasswordSalt { get; set; }

        /// <summary>
        /// Defined on BaseEntity
        /// </summary>
        //public bool IsActive { get; set; }
        //public DateTime CreatedOnTimeUtc { get; set; }
        //public DateTime UpdatedOnTimeUtc { get; set; }

        /// <summary>
        /// Gets or sets the password format
        /// </summary>
        public PasswordFormat PasswordFormat
        {
            get => (PasswordFormat)PasswordFormatId;
            set => PasswordFormatId = (int)value;
        }

    }

}
